#ifndef __tenacitas_distributed__logger__h__
#define __tenacitas_distributed__logger__h__


// =============================================================================
/**
   @file 
   Defines macro for making it easier to log messages
*/


// =============================================================================
//                                 C++ Headers


// =============================================================================
//                                 3rds Headers


// =============================================================================
//                                 Our Headers


// =============================================================================
//                                 Namespaces
using namespace std;


// =============================================================================
//                                 Macro Contants

/**
 */


// =============================================================================
//                                 Macro Commands

/** Logs a message that a function is starting
 @param [in] logger_ptr is a reference to a logger class that implements method
 <tt>void debug( const char * p_file, const char * p_function, uint32_t p_line,
 const char * p_msg );</tt>
*/ 
#define log_in(logger_ptr) logger_ptr->debug( __FILE__, __FUNCTION__, __LINE__, "IN" )

/** Logs a message that a function is ending
 @param [in] logger_ptr is a reference to a logger class that implements method
 <tt>void debug( const char * p_file, const char * p_function, uint32_t p_line,
 const char * p_msg );</tt>
*/ 
#define log_out(logger_ptr) logger_ptr->debug( __FILE__, __FUNCTION__, __LINE__, "OUT" )


/** Logs a message if the debug level is debug
 @param [in] logger_ptr is a reference to a logger class that implements method
 <tt>void debug( const char * p_file, const char * p_function, uint32_t p_line,
 const char * p_msg );</tt>
 @param msg is the message to be logged
*/ 
#define log_debug(logger_ptr,msg) logger_ptr->debug( __FILE__, __FUNCTION__, __LINE__, msg )

/** Logs a message if the debug level is warning
 @param [in] logger_ptr is a reference to a logger class that implements method
 <tt>void warn( const char * p_file, const char * p_function, uint32_t p_line,
 const char * p_msg );</tt>
 @param msg is the message to be logged
*/
#define log_warn(logger_ptr,msg) logger_ptr->warn( __FILE__, __FUNCTION__, __LINE__, msg )

/** Logs a message if the debug level is error
 @param [in] logger_ptr is a reference to a logger class that implements method
 <tt>void error( const char * p_file, const char * p_function, uint32_t p_line,
 const char * p_msg );</tt>
 @param msg is the message to be logged
*/
#define log_error(logger_ptr,msg) logger_ptr->error( __FILE__, __FUNCTION__, __LINE__, msg )

/** Logs a message if the debug level is critical
 @param [in] logger_ptr is a reference to a logger class that implements method
 <tt>void critica( const char * p_file, const char * p_function, uint32_t p_line,
 const char * p_msg );</tt>
 @param msg is the message to be logged
*/
#define log_critical(logger_ptr,msg) logger_ptr->critical( __FILE__, __FUNCTION__, __LINE__, msg )





#endif
